import React from 'react'
import ReactDOM from 'react-dom/client'

const root = ReactDOM.createRoot(document.getElementById('root'))

// 创建元素
const h1 = React.createElement(
  'h1',
  {
    title: '我是标题',
  },
  'hello react'
)

const ul2 = React.createElement(
  'ul',
  {
    className: 'list',
  },
  React.createElement('li', null, '香蕉'),
  React.createElement('li', null, '橘子'),
  React.createElement('li', null, '苹果')
)
root.render(<div>{ul2}</div>)
